package databas;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class ID_Calc {
	public int calcID(String table, String colum, Statement stat)
			throws SQLException {

		
		ResultSet rs = stat.executeQuery("select max(" + colum + ") from "
				+ table + ";");

		int u_id = rs.getInt(1) + 1;

		rs.close();

		return u_id;

	}
}
